<!--{template header}-->


<!--{if $_GET['op'] == 'delete'}-->

<div id="$pmid" class="ajaxshowdiv <!--{if !$_SGLOBAL[inajax]}-->inpage<!--{/if}-->">
<form id="pmform" name="pmform" method="post" action="cp.php?ac=pm&op=delete&folder=$folder&pmid=$pmid">
	<h1>确定删除指定的短消息吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="deletesubmit" value="true" />
		<input type="submit" name="deletesubmit" value="确定" class="submit" />
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="button" name="btnclose" value="取消" onclick="hideMenu();" class="button" />
		<!--{/if}-->
	</p>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{else}-->

<form id="pmform_{$pmid}" name="pmform_{$pmid}" method="post" action="cp.php?ac=pm&op=send&touid=$touid&pmid=$pmid" class="ajaxshowdiv">
<!--{if !$_SGLOBAL[inajax]}-->
<h2 class="title"><img src="image/icon/pm.gif">消息</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=pm"><span>发短消息</span></a></li>
		<li><a href="space.php?do=pm&view=inbox"><span>返回收件箱</span></a></li>
	</ul>
</div>
<div class="c_form">
<!--{else}-->
<div class="popupmenu_border">
<h1>发短消息</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div id="$touid" class="popupmenu_inner">
<!--{/if}-->

	<table cellspacing="0" cellpadding="3">
	<!--{if !$touid}-->
	<tr>
		<th><label for="username">收件人：</label></th>
		<td>
			<script type="text/javascript" src="source/js/script_autocomplete.js"></script>
			<input type="text" id="username" name="username" value="" style="width: 396px;" class="t_input" tabindex="1" <!--{if $friends}--> onclick="auc.handleEvent(this.value ,event);" onkeyup="auc.handleEvent(this.value ,event);" onkeydown="closeOpt(username,event);inputKeyDown(event);" autocomplete="off" <!--{/if}--> />
			<!--{if $friends}-->
			<div id="username_menu" class="ajax_selector" onclick="$('username_menu').style.display='none';" style="display:none">
				<div class="ajax_selector_option" style="width: 396px; height: 100px;">
					<a href="javascript:;" onclick="$('username_menu').style.display='none';" class="float_del" style="margin-right: 5px;">a</a>
					<ul id="friendlist" class="blocklink">
						<!--{loop $friends $key $value}-->
							<!--{eval $fs[] = $value['username'];}-->
							<li>$value[username]</li>
						<!--{/loop}-->
					</ul>
				</div>
			</div>
			<!--{eval $friendstr = implode(',', $fs);}-->
			<script type="text/javascript">
				var close = true;
				var auc = new sAutoComplete("auc", "username_menu", "friendlist", "username");
				auc.addItem('$friendstr');
				function closeOpt(key,evt) {
					if(evt.keyCode==9) {
						$('username_menu').style.display='none';
					}
				}
				function inputKeyDown(event) {
					if(event.keyCode == 13){
						doane(event);
					}
				}
			</script>

			<!--{/if}-->
		</td>
	</tr>

	<!--{/if}-->
	<tr>
		<th style="vertical-align: top;"><label for="message">内容：</label></th>
		<td><textarea id="message" name="message" cols="40" rows="4" style="width: 400px; height: 150px;" onkeydown="ctrlEnter(event, 'pmsubmit_btn');"></textarea></td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="pmsubmit" value="true" />
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="button" name="pmsubmit_btn" id="pmsubmit_btn" value="发送" class="submit" onclick="ajaxpost('pmform_{$pmid}', '$touid')" />
		<!--{else}-->
		<input type="submit" name="pmsubmit_btn" id="pmsubmit_btn" value="发送" class="submit" />
		<!--{/if}-->
		</td>
	</tr>
</table>
</div></div>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>

<!--{/if}-->
<!--{template footer}-->